home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 4
/
The 640 Meg Shareware Studio CD-ROM Volume IV (Data Express)(1994).ISO
/
clang
/
cuj0593.zip
/
1105098A
< prev
next >
Wrap
Text File
|
1993-05-16
|
468b
|
25 lines
/* copy2.c */
#include <stdio.h>
#include <stdlib.h>
main(int argc, char *argv[])
{
char s[BUFSIZ];
/* Open optional input file */
if (argc > 1)
if (freopen(argv[1],"r",stdin) == NULL)
return EXIT_FAILURE;
/* Open optional output file */
if (argc > 2)
if (freopen(argv[2],"w",stdout) == NULL)
return EXIT_FAILURE;
while (gets(s))
puts(s);
return EXIT_SUCCESS;
}